// 权限控制-控制用户可访问的路由并动态生成
import { constantRoutes } from '@/router' // 静态路由

export default {
  namespaced: true,
  state: {
    // 用于生成左侧菜单栏
    routes: constantRoutes
  },
  mutations: {
    setRoutes(state, otherRoutes) {
      state.routes = [...constantRoutes, ...otherRoutes]
    }
  },
  actions: {

  }
}
